package com.atjava.webspider.model;

import java.util.List;

import com.atjava.jox.annotation.ClassProps;
import com.atjava.jox.annotation.FieldProps;
import com.atjava.jox.annotation.FieldProps.ElementType;
import com.atjava.webspider.logic.Named;

@ClassProps(alias="database-config")
public class DatabaseConfig implements Named{
	
	@FieldProps
	private String name;

	@FieldProps
	private String username;
	
	@FieldProps
	private String password;
	
	@FieldProps
	private String driver;
	
	@FieldProps
	private String url;
	
	@FieldProps
	private String type;
	
	@FieldProps
	private String table;
	
	@FieldProps(type=ElementType.ELEMENT)
	private String sqlTmplt;
	
	@FieldProps
	private String sqlEncode;
	
	@FieldProps
	private String sqlPath;
	
	@FieldProps(type=ElementType.ELEMENT)
	private List<ColumnConfig> columnConfig;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTable() {
		return table;
	}

	public void setTable(String table) {
		this.table = table;
	}

	public List<ColumnConfig> getColumnConfig() {
		return columnConfig;
	}

	public void setColumnConfig(List<ColumnConfig> columnConfig) {
		this.columnConfig = columnConfig;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSqlTmplt() {
		return sqlTmplt;
	}

	public void setSqlTmplt(String sqlTmplt) {
		this.sqlTmplt = sqlTmplt;
	}

	public String getSqlEncode() {
		return sqlEncode;
	}

	public void setSqlEncode(String sqlEncode) {
		this.sqlEncode = sqlEncode;
	}

	public String getSqlPath() {
		return sqlPath;
	}

	public void setSqlPath(String sqlPath) {
		this.sqlPath = sqlPath;
	}
}
